package com.vmove.childtrain.domain;

import java.util.Objects;

/**
 * lightId与步骤码结合判断是否是同一个亮灯步骤
 */
public class IdAndStep {
    int lightId;
    int stepNum;

    public IdAndStep(int lightId, int stepNum) {
        this.lightId = lightId;
        this.stepNum = stepNum;
    }

    public int getLightId() {
        return lightId;
    }

    public void setLightId(int lightId) {
        this.lightId = lightId;
    }

    public int getStepNum() {
        return stepNum;
    }

    public void setStepNum(int stepNum) {
        this.stepNum = stepNum;
    }

    @Override
    public String toString() {
        return "IdAndStep{" +
                "lightId=" + lightId +
                ", stepNum=" + stepNum +
                '}';
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        IdAndStep that = (IdAndStep) o;
        return lightId == that.lightId &&
                stepNum == that.stepNum;
    }

    @Override
    public int hashCode() {
        return Objects.hash(lightId, stepNum);
    }

}
